import Vue from 'vue'
import App from './App.vue'
import TypeNav from '@/components/TypeNav'
import '@/plugins/validate'
import "swiper/css/swiper.css"
/* import {reqCategoryList} from '@/api' */
//import Carousel from '@/components/Carousel'
Vue.component(TypeNav.name, TypeNav)
Vue.component(Pagination.name, Pagination)
import Pagination from '@/components/Pagination'
/* Vue.component(Carousel.name,Carousel) */
//路由
import router from '@/router'
//引入仓库
import store from '@/store'
//测试
/* reqCategoryList() */
//统一接口api文件夹里面全部请求函数
import * as API from '@/api'
import '@/mock/mockServe'
import { Button, MessageBox } from 'element-ui';
import atm from '@/assets/1.gif';
//引入插件
import VueLazyload from 'vue-lazyload';
//注册插件
Vue.use(VueLazyload, {
  //懒加载默认的图片
  loading: atm
});
import myPlugins from '@/plugins/myPlugins';
Vue.use(myPlugins,{
  name:'upper'
})
Vue.component(Button.name, Button);
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
Vue.config.productionTip = false

new Vue({

  render: h => h(App),
  //组件身上有$router,$router
  beforeCreate() {
    Vue.prototype.$bus = this
    Vue.prototype.$API = API
  },
  router,
  store,//$store
  TypeNav,
}).$mount('#app')
